$(document).ready(function(){
	if(location.href.split('?error=')[1])
		$("#password").after('<div id="error" class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>Usuario o contrase\u00F1a introducidos son erroneos.</div>');
});

function comprobarSesion(){
	$.ajax({async:false,dataType:"html",type:"GET",url:"php/script_bd.php",data:"query=sesion",
		success: function(data){
			if(data.split('%')[0] == '0')
				location.href = "general.html";
		}
	});
}